package com.eating8.base.context;

import java.io.IOException;
import java.util.List;
import java.util.Map;

import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.Logger;

public class RequestTimeFilter implements Filter {

	public static final Logger log4j = Logger.getLogger(RequestTimeFilter.class);

	List<Map<String, String>> lm = null;

	public void destroy() {
		
	}

	public void doFilter(ServletRequest req, ServletResponse res,FilterChain chain) throws IOException, ServletException {
		HttpServletRequest request = (HttpServletRequest)req;
		log4j.info("--------doFilter-----------"+ request.getRequestURI()+"----"+request.getContextPath()+"----"+request.getServletPath());
		chain.doFilter(request, res);
	}

	public void init(FilterConfig arg0) throws ServletException {
		log4j.info("--------init-----------");
	}

}
